package com.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;

import com.dao.FileDao;
import com.pojo.ArchiveFile;
import com.util.MySqlSessionFactory;

public class FileService {
	SqlSession ss=MySqlSessionFactory.getSqlSession();
	FileDao dao=ss.getMapper(FileDao.class);
	public void file_add(
			@Param("archive_id") String archive_id,
			@Param("name") String name
			){
		
		dao.file_add(archive_id, name);
		ss.commit();
	}
	public List<ArchiveFile> file_query(){
		ss.commit();
		return dao.file_query();
	}
}
